#pragma once
#include <map>
#include "ILocationFwd.h"
#include "ImportExport.h"

namespace ja2{ namespace vfs
{
	class ILocation;

	//! Virtual profile
	class VirtualProfile : boost::noncopyable
	{
		// Typedefs
	private:
		typedef std::map<boost::filesystem::path, ILocationPtr_t> LocationMap_t;

		// Attributes
	private:
		//! Locations 
		LocationMap_t m_Locations;
		//! Profile name.
		std::string const m_Name;
		//! Is profile write able.
		bool const m_Writable;

		// Operations
	public:
		//! Add new location.
		void add_location(ILocationPtr_t &&pLoc);
		//! Location exist.
		bool location_exists(boost::filesystem::path const &Path) const;
		//! Is profile writeable.
		JA2_VFS_API bool is_writeable() const;
		//! Get location.
		ILocation *get_location(boost::filesystem::path const &Path) const;
		//! Get profile name.
		JA2_VFS_API std::string const &get_name() const;

		// Construction/Destruction
	public:
		VirtualProfile(std::string const &ProfileName, bool Writable);
	};
} /*vfs*/} /*ja2*/
